package com.hnichr.ump.common.assessment.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hnichr.ump.common.entity.UmpEntity;
import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.annotation.Dict;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "t_assessment_activity")
@Schema(description = "活动表")
public class Activity extends UmpEntity {
    @Id
    @Generator
    @Column(name = "ID_", updatable = false)
    @Schema(description = "ID")
    private String id;

    @Column(name = "BS_ACTIVITY_ID_")
    @Schema(description = "北森测评活动id")
    private String bsActivityId ;

    @Column(name = "NAME_",length = 500)
    @Schema(description = "测评活动名称")
    private String name ;

    @Column(name = "DESCRIPTION_",length = 1000)
    @Schema(description = "测评活动描述")
    private String description ;

    @Column(name = "STATE_")
    @Schema(description = "北森活动状态，1：启用，2：停用，3：删除")
    @Dict(dicCode = "BEISEN_ACTIVITY_STATE")
    private String state ;

    @Column(name = "ACTIVITY_CREATE_DATE_")
    @Schema(description = "活动创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date activityCreateDate ;

    @Column(name = "DISPLAY_NAME_",length = 500)
    @Schema(description = "测评活动展示名称")
    private String displayName ;

    @Column(name = "DISPLAY_STATE_")
    @Schema(description = "展示状态  1-展示  0-不展示")
    @Dict(dicCode = "YESNO")
    private String displayState ;

    @Column(name = "TENANT_ID_")
    @Schema(description = "租户")
    @Dict(dicCode = "BEISEN_ACTIVITY_TENANT")
    private String tenantId;

    @Column(name = "PAPER_ID_")
    @Schema(description = "试卷ID")
    private String paperId ;

    @Column(name = "ORDER_NUM_")
    @Schema(description = "排序字段")
    private Integer orderNum;

}
